package com.example.designpatterns.behavioral.Strategy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author zuitu@foxmail.com
 * @date 2024/1/17
 * context
 */
@Component
public class Calculation {
    @Autowired
    private Strategy strategy;

    public int doCalc(int a, int b) {
       return strategy.doOperation(a, b);
    }
}
